const { request, response } = require('express');
//1 引入express
const express = require('express');

//2 创建应用对象
const app = express();

//3 创建路由规则
app.get('/',(request,response)=>{//request 是请求报文的封装， response 是响应报文的封装
    response.send('hello express');
});

//4 监听端口，启动服务
app.listen(8000,()=>{
    console.log("服务已经启动，8000端口监听中");
});